package com.huike.clues.mapper;

import com.huike.clues.domain.SysDictType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface SysDictTypeMapper {

    List<SysDictType> list(SysDictType sysDictType);


    @Select("select * from sys_dict_type where dict_id = #{dictId}")
    SysDictType getDetailsById(Long dictId);

    //@Insert("insert into sys_dict_type(dict_name, dict_type, status, create_by, create_time,remark) values(#{dictName}, #{dictType}, #{status}, #{createBy}, #{createTime},#{remark})")
    void add(SysDictType sysDictType);

    @Select("select count(*) from sys_dict_type where dict_type = #{dictType}")
    int checkDictTypeUnique(String dictType);
}
